Skip to content

feat(xc_admin_common): add MigrateGovernanceAndWormhole governance codec - #3938

Open
keyvankhademi wants to merge 3 commits into
mainfrom
feat/xc-admin-set-wormhole-and-datasources
Open

feat(xc_admin_common): add MigrateGovernanceAndWormhole governance codec#3938
keyvankhademi wants to merge 3 commits into
mainfrom
feat/xc-admin-set-wormhole-and-datasources

Conversation

@keyvankhademi

@keyvankhademi keyvankhademi commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds MigrateGovernanceAndWormhole (Target action 10) encode/decode in @pythnetwork/xc-admin-common.
  • Wire format (after PTGM header): wormhole(20) | dataSources* | governanceEmitter(chain u16 + addr 32) | governanceDataSourceIndex(u32)no fee.
  • Atomic cutover codec for legacy → pro-compatible migrate (wormhole + price data sources + new governance emitter).
  • Frontend proposal utils updated so action 10 is recognized.
  • Roundtrip coverage in GovernancePayload.test.ts.

Sibling PRs:

  • EVM Solidity handler
  • contract_manager migrate tooling (depends on this export)

Test plan

  • Run xc_admin_common governance payload tests
  • Decode a sample migrate payload and confirm action id byte is 10
  • Confirm body includes governance emitter + index and has no fee trailer
  • Confirm frontend proposal summary does not show action 10 as unknown

…e codec

Add Target action 10 encode/decode for combined wormhole address, data
sources, and fee updates used by the EVM Pro-compatible in-place upgrade.
@keyvankhademi
keyvankhademi requested a review from a team as a code owner July 28, 2026 20:17
Copilot AI review requested due to automatic review settings July 28, 2026 20:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-reference Ready Ready Preview Jul 30, 2026 8:41pm
component-library Ready Ready Preview Jul 30, 2026 8:41pm
developer-hub Ready Ready Preview Jul 30, 2026 8:41pm
proposals Ready Ready Preview Jul 30, 2026 8:41pm
3 Skipped Deployments
Project Deployment Actions Updated (UTC)
entropy-explorer Skipped Skipped Jul 30, 2026 8:41pm
insights Skipped Skipped Jul 30, 2026 8:41pm
staking Skipped Skipped Jul 30, 2026 8:41pm

Request Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment on lines +9 to +20
const DataSourceLayout: BufferLayout.Structure<DataSource> =
BufferLayout.struct([
BufferLayout.u16be("emitterChain"),
BufferLayoutExt.hexBytes(32, "emitterAddress"),
]);

const FeeLayout: BufferLayout.Structure<
Readonly<{ newFeeValue: bigint; newFeeExpo: bigint }>
> = BufferLayout.struct([
BufferLayoutExt.u64be("newFeeValue"),
BufferLayoutExt.u64be("newFeeExpo"),
]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Wire ordering (data-source chain/address, fee value/expo) not verifiable against sibling EVM handler

The wire format encodes each data source as emitterChain(u16be) then emitterAddress(32) and the fee trailer as newFeeValue(u64be) then newFeeExpo(u64be), matching the local SetDataSources/SetFee conventions. However the PR description states the format must match the Solidity parser in a sibling EVM PR, which is not present in this repo, so byte-for-byte compatibility with the on-chain handler could not be confirmed here. Worth confirming against the EVM handler PR before relying on cross-chain interop.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

…rces codec

Align payload with Solidity: wormhole address + data sources only.
…eAndWormhole

Expand the wire format to include governance emitter and index alongside
the wormhole address and price data sources.
@vercel
vercel Bot temporarily deployed to Preview – entropy-explorer July 30, 2026 20:37 Inactive
@vercel
vercel Bot temporarily deployed to Preview – insights July 30, 2026 20:37 Inactive
@vercel
vercel Bot temporarily deployed to Preview – staking July 30, 2026 20:37 Inactive
@keyvankhademi keyvankhademi changed the title feat(xc_admin_common): add SetWormholeAddressAndDataSources governance codec feat(xc_admin_common): add MigrateGovernanceAndWormhole governance codec Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants